print "<center>[ <a href=\"$baseurl/$mesgdir/$num\.$ext\">Go to Your Message</a> ] [ <a href=\"$baseurl/$mesgfile\">$title</a> ]</center>\n";
print "</body></html>\n";
}
sub increment_num {
open(NUM,">$basedir/$datafile") || die $!;
print NUM "$num";
close(NUM);
}
sub error {
$error = $_[0];
print "Content-type: text/html\n\n";
if ($error eq 'no_name') {
print "<html><head><title>$title ERROR: No Name</title></head>\n";
print "<body><center><h1>ERROR: No Name</h1></center>\n";
print "You forgot to fill in the 'Name' field in your posting. Correct it below and re-submit. The necessary fields are: Name, Subject and Message.<p><hr size=7 width=75%><p>\n";
&rest_of_form;
}
elsif ($error eq 'no_subject') {
print "<html><head><title>$title ERROR: No Subject</title></head>\n";
print "<body><center><h1>ERROR: No Subject</h1></center>\n";
print "You forgot to fill in the 'Subject' field in your posting. Correct it below and re-submit. The necessary fields are: Name, Subject and Message.<p><hr size=7 width=75%><p>\n";
&rest_of_form;
}
elsif ($error eq 'no_body') {
print "<html><head><title>$title ERROR: No Message</title></head>\n";
print "<body><center><h1>ERROR: No Message</h1></center>\n";
print "You forgot to fill in the 'Message' fieldin your posting. Correct it below and re-submit. The necessary fields are: Name, Subjectand Message.<p><hr size=7 width=75%><p>\n";